package top.igotcha.eduservice.controller;

import org.springframework.web.bind.annotation.*;
import top.igotcha.commonutils.utils.R;

/**
 * @author Gotcha
 * @date 2021/8/3
 * @describe
 */
@RestController
@RequestMapping("/eduservice/user")
//@CrossOrigin//解决跨域
public class EduLoginController {

    @PostMapping("login")
    public R login(){
        return R.OK().data("token","admin");
    }

    @GetMapping("info")
    public R info(){
        return R.OK().data("roles","[admin]").data("name","admin").data("avatar","https://image.baidu.com/search/detail?ct=503316480&z=0&ipn=d&word=%E5%9B%BE%E7%89%87&hs=0&pn=2&spn=0&di=167640&pi=0&rn=1&tn=baiduimagedetail&is=0%2C0&ie=utf-8&oe=utf-8&cl=2&lm=-1&cs=1514002029%2C2035215441&os=1877667074%2C2954420195&simid=3455148517%2C365567886&adpicid=0&lpn=0&ln=30&fr=ala&fm=&sme=&cg=&bdtype=0&oriquery=%E5%9B%BE%E7%89%87&objurl=https%3A%2F%2Fgimg2.baidu.com%2Fimage_search%2Fsrc%3Dhttp%3A%2F%2Fimg.16pic.com%2F00%2F88%2F44%2F16pic_8844212_s.jpg%26refer%3Dhttp%3A%2F%2Fimg.16pic.com%26app%3D2002%26size%3Df9999%2C10000%26q%3Da80%26n%3D0%26g%3D0n%26fmt%3Djpeg%3Fsec%3D1630568592%26t%3D590b35ccefdc32c7866c8972b94265ac&fromurl=ippr_z2C%24qAzdH3FAzdH3Fooo_z%26e3B8mrtv_z%26e3Bv54AzdH3Ff7vwtAzdH3F9cdlndl_z%26e3Bip4s&gsm=3&islist=&querylist=");
    }
}
